import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/questionbank/` + url, ...arg)

/**
 * 题库Api接口管理器
 *
 * @author lrw
 * @date  2025/10/04 09:46
 **/
export default {
	// 获取题库分页
	exmQuestionBankPage(data) {
		return request('page', data, 'get')
	},
	// 提交题库表单 edit为true时为编辑，默认为新增
	exmQuestionBankSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除题库
	exmQuestionBankDelete(data) {
		return request('delete', data)
	},
	// 获取题库详情
	exmQuestionBankDetail(data) {
		return request('detail', data, 'get')
	}
}
